package com.mhtool.core.collection;

import lombok.experimental.UtilityClass;

import java.util.ArrayList;
import java.util.List;

/**
 * @author yin
 * @date 2021/12/27 17:20
 * @since 8.0.0
 */
@UtilityClass
public class ListUtils {
    public static <E> List<E> asList(E ...e) {
        if (null == e) {
            return new ArrayList<>(0);
        }
        List<E> list = new ArrayList<>(e.length);
        for (E e1 : e) {
            list.add(e1);
        }
        return list;
    }
}
